/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fwannotations.context;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author HP_Propietario
 */
public class ContextControl {
    private static  Map<String, String> map=new HashMap<String, String>();
    private static  Map<String, String> miAnn=new HashMap<String, String>();
    private static  Map<String, String> methodoMap=new HashMap<String, String>();
    private static  ContextControl instance;

    private ContextControl() {
    }

    public static ContextControl getContextControl(){
            if(instance!=null){
                    return instance;
            }else{
                return  new ContextControl();
            }
    }

    public static  void addControlsControl(String object,String uri ){
        if(map==null){
            map=new HashMap();
        }
        System.out.println("almacenada-->"+object);
        System.out.println("almacenada-->"+uri);
        map.put(object,uri);
    }

    public static  void addControlsMiAnn(String nombre,String apellidos ){
        if(miAnn==null){
            miAnn=new HashMap();
        }
        System.out.println("nombre"+nombre);
        System.out.println("apellidos-->"+apellidos);
        map.put(nombre,apellidos);
    }
    public static  void addControlsMethodoMap(String nombre,String apellidos ){
        if(methodoMap==null){
            methodoMap=new HashMap();
        }
        map.put(nombre,apellidos);
    }

    public static void printMap(Map<String, String> mapa){
        System.out.println("printMap-->");
        for(String key: mapa.keySet()){
            System.out.println(""+key);
            System.out.println(""+mapa.get(key));

        }
    }



    

}
